<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use DateTimeInterface;
use DB;

class Worklinkurl extends Model
{
    protected $table = 'work_link_url';
    protected $primaryKey = 'id';

    public static function createWorkLinkUrl($corp_id,$link_url)
    {
        return self::insert(["corp_id"=>$corp_id,"link_url"=>$link_url,"created_at"=>time()]);
    }

    public static function getWorkLinkUrl()
    {
        return self::select("link_url")->get();
    }

    public static function getWorkLinkUrlList()
    {
        return self::get();
    }

    public static function deleteWorkLinkUrl($corp_id)
    {
        return self::where("corp_id",$corp_id)->delete();
    }

    public static function deleteWorkLinkUrlId($id)
    {
        return self::where("id",$id)->delete();
    }
}
